<template>
  <div class="login">
    <div class="form">
      <h1>{{ $t("message.login") }}</h1>
      <div class="item">
        <label for="username">{{ $t("message.username") }}</label>
        <input type="text" id="username" />
      </div>
      <div class="item">
        <label for="password">{{ $t("message.password") }}</label>
        <input type="text" id="password" />
      </div>
      <div class="item">
        <button>{{ $t("message.login") }}</button>
      </div>
      <div class="item">
        <button @click="changeLang">{{ $t("message.changeLang") }}</button>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
 
import { useI18n } from "vue-i18n";
import { useCommomStore } from "@/pinia/store/commom.pinia";
const { locale } = useI18n();
const storeLoginStore = useCommomStore();

const changeLang = () => {
  // storeLoginStore.changeIndex();
  
};
</script>

<style lang="scss" scoped>
.login {
  height: 100vh;
  width: 100vw;
  // background: #000;
  position: relative;
  .form {
    h1 {
      color: rgb(125, 28, 194);
      font-size: 50px;
      margin: 10px 0;
      text-align: center;
    }
    height: 400px;
    width: 300px;
    background: red;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 30px;
    .item {
      position: relative;
      label {
        position: absolute;
        top: 0;
        left: 40px;
      }
    }
    input {
      display: block;
      border-radius: 10px;
      margin: 20px auto;
      width: 80%;
      height: 30px;
      border: none;
      outline: none;
      border-bottom: black 2px solid;
    }
  }
}
</style>
